﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using XRpgLibrary.ScriptClasses;
using XRpgLibrary.CharacterClasses;

using Microsoft.Xna.Framework;

namespace XRpgLibrary.Scripts.Global
{
    public class RemoveScript : GameScript
    {
        private string eventName;
        private string scriptName;

        public RemoveScript(string eventName = "CharacterUpdate", string scriptName = "XRpgLibrary.Scripts.Movement.Wander")
        {
            this.eventName = eventName;
            this.scriptName = scriptName;
        }

        public override void Execute(Character sender, object trigger, ScriptContext context, GameTime gameTime)
        {
            sender.RemoveScriptEvent(eventName, scriptName);
        }
    }
}
